\hypertarget{powermeter_8h}{
\section{front\_\-panel/powermeter.h File Reference}
\label{powermeter_8h}\index{front\_\-panel/powermeter.h@{front\_\-panel/powermeter.h}}
}
Power meter functions.  


\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{structpowermeter__struct}{powermeter\_\-struct}
\begin{CompactList}\small\item\em Struct which contains information of the power meter status. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{powermeter_8h_802ee0989df8b107d06a15a4c130b281}{powermeter\_\-update\_\-values} (unsigned int fwd\_\-pwr, unsigned int ref\_\-pwr, unsigned int vswr)
\begin{CompactList}\small\item\em Update the values of the power meter. \item\end{CompactList}\item 
void \hyperlink{powermeter_8h_e90f9a0d1fdc31dd734304f544e2834d}{powermeter\_\-init} (unsigned char pickup\_\-addr, unsigned int text\_\-update\_\-rate, unsigned int bargraph\_\-update\_\-rate, unsigned int vswr\_\-limit)
\begin{CompactList}\small\item\em Initialize the power meter. \item\end{CompactList}\item 
\hypertarget{powermeter_8h_cbe105d945a1d31fe09796270252546d}{
void \hyperlink{powermeter_8h_cbe105d945a1d31fe09796270252546d}{powermeter\_\-process\_\-tasks} (void)}
\label{powermeter_8h_cbe105d945a1d31fe09796270252546d}

\begin{CompactList}\small\item\em This function should be called as much as possible and it does all the updates, such checking for new data, updating display etc. \item\end{CompactList}\item 
\hypertarget{powermeter_8h_87a92b8ac14dbe3814bbf1f09c349902}{
void \hyperlink{powermeter_8h_87a92b8ac14dbe3814bbf1f09c349902}{powermeter\_\-1ms\_\-tick} (void)}
\label{powermeter_8h_87a92b8ac14dbe3814bbf1f09c349902}

\begin{CompactList}\small\item\em This function should be called at 1 ms intervals. It is to keep track of update rates etc for the display. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Power meter functions. 

\begin{Desc}
\item[Author:]Mikael Larsmark, SM2WMV \end{Desc}
\begin{Desc}
\item[Date:]2010-05-12 

\begin{Code}\begin{verbatim} #include "front_panel/powermeter.h" 
\end{verbatim}
\end{Code}

 \end{Desc}


Definition in file \hyperlink{powermeter_8h-source}{powermeter.h}.

\subsection{Function Documentation}
\hypertarget{powermeter_8h_e90f9a0d1fdc31dd734304f544e2834d}{
\index{powermeter.h@{powermeter.h}!powermeter\_\-init@{powermeter\_\-init}}
\index{powermeter\_\-init@{powermeter\_\-init}!powermeter.h@{powermeter.h}}
\subsubsection[{powermeter\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void powermeter\_\-init (unsigned char {\em pickup\_\-addr}, \/  unsigned int {\em text\_\-update\_\-rate}, \/  unsigned int {\em bargraph\_\-update\_\-rate}, \/  unsigned int {\em vswr\_\-limit})}}
\label{powermeter_8h_e90f9a0d1fdc31dd734304f544e2834d}


Initialize the power meter. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pickup\_\-addr}]The address of the powermeter unit that sends the information \item[{\em text\_\-update\_\-rate}]How often we should refresh the text on the display \item[{\em bargraph\_\-update\_\-rate}]How often we should update the bargraph of the display \item[{\em vswr\_\-limit}]What is the SWR limit of the device, when this is exceeded we shut down the possibility to PTT \end{description}
\end{Desc}


Definition at line 53 of file powermeter.c.

References powermeter\_\-struct::bargraph\_\-update\_\-rate, powermeter\_\-struct::curr\_\-fwd\_\-pwr\_\-value, powermeter\_\-struct::curr\_\-ref\_\-pwr\_\-value, powermeter\_\-struct::curr\_\-vswr\_\-value, powermeter\_\-struct::pickup\_\-addr, powermeter\_\-struct::text\_\-update\_\-rate, and powermeter\_\-struct::vswr\_\-limit.

Referenced by main().\hypertarget{powermeter_8h_802ee0989df8b107d06a15a4c130b281}{
\index{powermeter.h@{powermeter.h}!powermeter\_\-update\_\-values@{powermeter\_\-update\_\-values}}
\index{powermeter\_\-update\_\-values@{powermeter\_\-update\_\-values}!powermeter.h@{powermeter.h}}
\subsubsection[{powermeter\_\-update\_\-values}]{\setlength{\rightskip}{0pt plus 5cm}void powermeter\_\-update\_\-values (unsigned int {\em fwd\_\-pwr}, \/  unsigned int {\em ref\_\-pwr}, \/  unsigned int {\em vswr})}}
\label{powermeter_8h_802ee0989df8b107d06a15a4c130b281}


Update the values of the power meter. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fwd\_\-pwr}]The current forward power in watts \item[{\em ref\_\-pwr}]The current reflected power in watts \item[{\em vswr}]The current VSWR value, for example 151 means 1.51:1 in VSWR \end{description}
\end{Desc}


Definition at line 86 of file powermeter.c.